home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbwinfnt.zip
/
EX_FSTST.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-03-01
|
1KB
|
37 lines
REM: EX_FSTST.BAS, Unregistered Version 1.0
REM: Example of using FastString to display text.
DECLARE SUB FastString (Text$, FClr%, X%, Y%, FontArray%())
DECLARE SUB LoadRsrcFileFont (FlName$, FontNum%, FontArray%(), RetCode%, RetMsg$)
'...setup a VGA screen mode...
SCREEN 12
'...set file name (change to match your system if necessary)...
FlName$ = "\windows\system\SSERIFF.FON"
'...dim arrays for font data (use REDIM so they're DYNAMIC)...
REDIM Serif8pt%(1), Serif10pt%(1), Serif12pt%(1)
PRINT : PRINT "Loading fonts from "; FlName$; "..."
'...load the eight-point font (#1 in file)...
CALL LoadRsrcFileFont(FlName$, 1, Serif8pt%(), RetCode%, RetMsg$)
IF (RetCode% <> 0) THEN STOP
'...load the ten-point font (#2 in file)...
CALL LoadRsrcFileFont(FlName$, 2, Serif10pt%(), RetCode%, RetMsg$)
IF (RetCode% <> 0) THEN STOP
'...load the twelve-point font (#3 in file)...
CALL LoadRsrcFileFont(FlName$, 3, Serif12pt%(), RetCode%, RetMsg$)
IF (RetCode% <> 0) THEN STOP
'...display a sample string in each font...
CALL FastString(" MS Sans Serif 8-point ", 2, 20, 70, Serif8pt%())
CALL FastString(" MS Sans Serif 10-point ", 2, 20, 90, Serif10pt%())
CALL FastString(" MS Sans Serif 12-point ", 2, 20, 116, Serif12pt%())
END